const mongoose = require('mongoose')

const {
  Schema,
  model
} = mongoose

const productSchema = new Schema({
  __v: {
    type: Number,
    select: false
  },
  title: {
    type: String,
    required: true
  },
  description: {
    type: String,
  }, 
  price: {
    type: String,
  },
  producter: {
     type: Schema.Types.ObjectId,
     ref: 'User',
   },
})


// 集合名称 ，schema
module.exports = model('Product', productSchema)
